package com.gnerv.rabbitmq.agent.command;

import com.gnerv.rabbitmq.agent.model.entity.Node;
import com.gnerv.rabbitmq.agent.tools.ExecTools;
import com.google.common.collect.Lists;

import java.util.List;

/**
 * @author Gnerv LiGen
 */
public class ConsumerCommand extends AbstractRabbitmqctlCommand {

    public ConsumerCommand(Node node){
        super();
        setNode(node);
    }

    public static ConsumerCommand build(Node node){
        return new ConsumerCommand(node);
    }

    public ExecTools.ExecResult listConsumers() {
        List<String> listExchanges = Lists.newArrayList();
        listExchanges.add("list_consumers");
        return run(listExchanges);
    }

}
